import axios from '../../axios.js';

const categoryApis= {
    //获取数据
    showCategorys:function (params) {
        //发请求
        return axios({
            url:"/category/showCategorys",
            method:"get",
            params
        })
    },
    //删除单个
    delectone:function (data) {
        return axios({
            url:"/category",
            method:"delete",
            data
        })
    },
    //新增种类
    addcategory:function (data) {
        return axios({
            url:"/category",
            method:"post",
            data
        })
    },
     //获取要修改的匹配的数据
     getcategoryid:function (params) {
        return axios ({
            url: "/category/"+params,
            method: "get",
        })
    },
      //确认修改信息
      updatecategory:function (data) {
        return axios ({
            url: "/category",
            method: "put",
            data
        })
    }

}


export default categoryApis;